package com.yc.book.biz;

import java.sql.SQLException;

import com.yc.book.dao.LeadDao;
import com.yc.book.util.Utils;

public class LeadBiz {
	
	private LeadDao dao = new LeadDao();
	
	public void lead(Object rid, Object bid) throws BizException {
		
		Utils.check(Utils.isEmpty(rid), "请确认借书人");
		
		Utils.check(Utils.isEmpty(bid), "请选择要借出的图书");
		
		try {
			dao.insert(rid,bid);
		} catch (SQLException e) {
			throw new BizException("业务异常,请联系客服!", e);
		}
		
	}

}
